package io.sage.common.scheduler;

import io.sage.modules.query.service.WeatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author zxh
 * @Title: Scheduler
 * @ProjectName sage_wms
 * @Description: TODO
 * @date 2019/8/1415:50
 */
@Component
public class Scheduler {
    @Autowired
    private WeatherService weatherService;
    //每天3：05执行
    @Scheduled(cron = "0 05 03 ? * *")
    //@Scheduled(fixedRate = 20000)
    public void readWeather() {
        weatherService.readWeather();
    }
}
